from selenium.webdriver.common.by import By

from Page.base_page import BuyerBasePage
import logging


class SearchPage(BuyerBasePage):
    def __init__(self):
        super().__init__()

        self.goods_name = (By.CLASS_NAME, 'shop_name2')
        self.goods_address = (By.XPATH, '//div[@class="shop-list-splb p"]/ul/li[1]/div/div/a')

    def get_goods_msg(self):
        return self.find_el(*self.goods_name).text

    def get_shop_address(self):
        self.find_el(*self.goods_address).click()
